import Vue from 'vue'
import Router from 'vue-router'


Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      redirect:'/guide',
      name: 'HelloWorld',
      component: ()=>import('@/components/HelloWorld')//路由懒加载
    },
    {
      path:'/guide',//引导页
      name:'Guide',
      component:()=>import('@/views/Guide')
    },
    {
      path:'/login',
      name:'Login',
      component:()=>import('@/views/Login'),
    },
    {
      path:'/register',
      name:'Register',
      component:()=>import('@/views/Register')
    },
    {
      path: '/index',
      name: 'Index',
      component: ()=>import('@/views/Index'),
      redirect:'/home',
      children:[
        {
          path:'/home',
          name:'Home',
          component:()=>import('@/views/Home'),
          redirect:'/focus',
          children:[
            {
              path:'/focus',
              name:'Focus',
              component:()=>import('@/views/HomeFocus')
            },
            {
              path:'/summer',
              name:'Summer',
              component:()=>import('@/views/HomeSummer'),
            }
          ]
        },
        {
          path:'/classify',
          name:'Classify',
          component:()=>import('@/views/Classify'),
          redirect:'/classifyMain',
          children:[
            {
              path:'/classifyMain',
              name:'ClassifyMain',
              component:()=>import('@/views/ClassifyMain')
            },
            {
              path:'/classifyFishon',
              name:'ClassifyFishon',
              component:()=>import('@/views/ClassifyFishon'),
            }
          ]
        },
        {
          path:'/publish',
          name:'Publish',
          component:()=>import('@/views/Publish'),
        },
        {
          path:'/message',
          name:'Message',
          component:()=>import('@/views/Message'),
        },
        {
          path:'/mine',
          name:'Mine',
          component:()=>import('@/views/Mine')
        }
      ]
    },// Index
    {
      path:'/mypub',
      name:'MyPub',
      component:()=>import('@/views/MinePublish')
    },
    {
      path:'/mysell',
      name:'MySell',
      component:()=>import('@/views/MineSell')
    },
    {
      path:'/mybuy',
      name:'MyBuy',
      component:()=>import('@/views/MineBuy')
    },
    {
      path:'/myrefund',
      name:'MyRefund',
      component:()=>import('@/views/MineRefund')
    },
    {
      path:'/shop',
      name:'Shop',
      component:()=>import('@/views/MineShop')
    },
    {
      path:'/mymessage',
      name:'Message',
      component:()=>import('@/views/MineMessage')
    },
    {
      path:'/msgSetting',
      name:'msgSetting',
      component:()=>import('@/views/MineSetting')
    },
    {//消息->订单-活动-通知-留言-私信
      path:'/dingdan',
      name:'Dingdan',
      component:()=>import('@/views/MessageDingdan'),
    },
    {
      path:'/play',
      name:'Play',
      component:()=>import('@/views/MessagePlay'),
    },
    {
      path:'/tongzhi',
      name:'Tongzhi',
      component:()=>import('@/views/MessageTongzhi'),
    },
    {
      path:'/liuyan',
      name:'Liuyan',
      component:()=>import('@/views/MessageLiuyan'),
    },
    {
      path:'/sixin',
      name:'Sixin',
      component:()=>import('@/views/MessageSixin'),
    },
    {
      path:'/summerDetail',
      name:'summerDetail',
      component:()=>import('@/views/HomeSummerDetail'),
    },
    {
      path:'/address',
      name:'Address',
      component:()=>import('@/views/MineAddr')
    },
    {
      path:'/addAddr',
      name:'addAddr',
      component:()=>import('@/views/MineAddAddr')
    },
	{
		path:'/cars',
		name:'Cars',
		component:()=>import('@/views/MineCar')
	}
  ]
})
